<script type="text/javascript">
    RED.nodes.registerType('iotps', {
        category: '物联网平台', //节点分类
        color: '#1890FF', //节点背景颜色
        defaults: {
            config: {value: '', type: 'iotps-config'}, //以json格式定义一些属性值，在节点拖动到sheet中时，会通过config参数传递
            network: {
                value: '',
                // validate: RED.validators.number(),
                type: ''
            },
            name: {value: ""}
        },
        inputs: 0, //节点输入 0 or 1
        outputs: 1, //节点输出 0 or more
        icon: 'bridge.png',
        label: function () {
            return `${this.host}:${this.port}`;
        },
        palleteLabel: '网络服务'
    });
</script>

<script type="text/x-red" data-template-name="iotps-">
    <div class="form-row">
        <label for="node-input-config">
            <i class="icon-server"></i>
            配置
        </label>
        <input type="text" id="node-input-config">
    </div>
    <div class="form-row">
        <label for="node-input-network">
            <i class="icon-sliders"></i>
            端口号
        </label>
        <input type="test" id="node-input-network">
    </div>
    <div class="form-row">
        <label for="node-input-name">
            <i class="icon-sliders"></i>
            名称
        </label>
        <input type="test" id="node-input-name">
    </div>

</script>

<script type="text/x-red" data-help-name="iotps">
    <p></p>

</script>